Pydoc writer codemarkups
========================

literals
--------

Literal are recognized by a text specific markup.py

informational units
-------------------

these are markups to allow index creation.

::

  \begin{datadesc} {name} 
  \begin{datadescni} {name} 
  \begin{excdesc} {name} 
  \begin{classdesc*} {name} 
  \begin{csimplemacrodesc} {name} 
  
.. topic:: ctype with_tag and_name
   :class: ctypedesc

   bla bla

::

  \begin{ctypedesc} [tag]{name} 
  \begin{memberdesc} [type name]{name} 
  \begin{memberdescni} [type name]{name} 

.. topic:: sizeof(type_or_object)
   :class: funcdesc

   Returns the size in bytes of a ctypes type or instance memory
   buffer.  Does the same as the C sizeof() function.

::

  \begin{cvardesc} {type}{name} 
  \begin{excclassdesc} {name}{constructor parameters} 
  \begin{funcdesc} {name}{parameters} 
  \begin{funcdescni} {name}{parameters} 

  \begin{methoddesc} [type name]{name}{parameters} 
  \begin{methoddescni} [type name]{name}{parameters}
  
  \begin{cmemberdesc} {container}{type}{name}
  \begin{classdesc} {name}{constructor parameters} 
  \begin{cfuncdesc} {type}{name}{args}

definition lists
''''''''''''''''

with classifier ::

   sizeof(type_or_object) : funcdesc
       Returns the size in bytes of a ctypes type or instance memory
	   buffer.  Does the same as the C sizeof() function.


plain definitions are set as datadescni, maybe latex description would 
be better ::

  standalone :
     is marked as datadescni

test samples
''''''''''''

standalone :
   is marked as datadescni
which :
   might be a not so optimal solution.

Real informational units

Class : classdesc*
   without constructor documentation.

sizeof(type_or_object) : funcdesc
    Returns the size in bytes of a ctypes type or instance memory
    buffer.  Does the same as the C sizeof() function.

a function with optional parameter

create_string_buffer(init[, size]) : funcdesc
    does this or that

file : datadesc 
  also datadescni, excdesc, classdesc*, csimplemacrodesc

FileRO : ctypedesc
  without tag

ftag FileRW : ctypedesc
  with tag
  also memberdesc, memberdescni

read(int bytes [, bool flush [, bool after]]) : funcdescni 
  two optional parameter.
  also cvardesc, funcdesc, funcdescni, classdesc, excclassdesc

force_it(string s) : methoddesc
  without return type

bool write(string s) : methoddescni
  with return type

int read(File) : cfuncdesc
  not a tag but a type

PyTypeObject long tp_flags : cmemberdesc
  This field is a bit mask of various flags. Some flags indicate
  variant semantics for certain situations; others are used to

extra markup to the definition does not change anything as the writer processes
only the text version.

``sizeof(type_or_object)`` : funcdesc
    Returns the size in bytes of a ctypes type or instance memory
    buffer.  Does the same as the C sizeof() function.

``from_address(address)`` : methoddesc
   This method returns a ctypes type instance using the memory
   specified by address.


alternatives
''''''''''''

* customroles ::

    .. role:: funcdesc

    :funcdesc:`sizeof(type_or_object)`

        Returns the size in bytes of a ctypes type or instance memory
        buffer.  Does the same as the C sizeof() function.

  But the block after funcdesc should be inside funcdesc not in a separate 
  block quote.

* admonitions : 
  Have a text block and a title. ::

    .. admonition:: sizeof(type_or_object)
       :class: funcdesc

       Returns the size in bytes of a ctypes type or instance memory
       buffer.  Does the same as the C sizeof() function.

* directives

  see sandbox/edloper/docpy/asyncore.rst.

* topics

  Have a text block and a title::

    .. topic:: c_char
       :class: datadesc

       the ...

